package com.igrid.demo.client;

import com.google.gwt.user.client.Event;
import com.google.gwt.user.client.ui.Widget;

/**
 * DND event handler
 * 
 * @author cuij
 * @Date 2009-7-9
 * @see DragAndDropEventSource
 */
public interface DragAndDropHandler {


	 /**
	 * Invoke once user dragging one column to a new place.
	 * <p>
	 * It should be triggered from a DragAndDropEventSource instance.
	 * <p>
	 * 
	 * @param sender target element
	 * @param event MouseMove event
	 * @param offSetX X coordinator offset units. If the units is  greater than zero ,means user resizing is from RTL,
	 * 				  else LTR.
	 *  
	 */
	public void onDrag(Widget sender,Event event,int offSetX);
	
	
	/**
	 * Invoke once user release the mouser and decide to drop the column to a new place.
	 * <p>
	 * It should be triggered from a DragAndDropEventSource instance.
	 * <p>
	 * 
	 * @param sender target element
	 * @param event MouseUp event
	 * @param offSetX X coordinator offset units. If the units is  greater than zero ,means user resizing is from RTL,
	 * 				  else LTR.
	 *  
	 */
	public void onDrop(Widget sender,Event event,int offSetX);
}
